package com.algernoon.rpc.springrpc.rmi.burlap.impl;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.algernoon.rpc.springrpc.entity.User;
import com.algernoon.rpc.springrpc.rmi.burlap.IBurlapUserService;

@Service
public class BurlapUserServiceImpl implements IBurlapUserService {

	Logger logger = LoggerFactory.getLogger(BurlapUserServiceImpl.class);

	public Map<Integer, User> map = new HashMap<Integer, User>() {

		private static final long serialVersionUID = 8583541726415808090L;

		{
			put(1, new User(1, "zhangsan", "123456"));
			put(2, new User(2, "lisi", "123456"));
			put(3, new User(3, "wangwu", "123456"));
			put(4, new User(4, "zhaoliu", "123456"));
		}
	};

	
	@Override
	public User findUserById(Integer id) {
		return map.get(id);
	}

}
